#include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	int i, j;
	int s = 1;
	int a[4][4];
	for (i = 0; i <= 3; i++) {
	for (j = i; j <= 3; j++) {
		a[i][j] = s++;
		a[j][i] = a[i][j];
	}
}
for(i = 0; i<=3; i++) {
	for(j = 0; j <= 3; j++) {
		if(j==3)
			printf("%d\n", a[i][j]);
		else
		printf("%d ",a[i][j]);
	}
}


return 0;
}
